<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateEmployeeTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateEmployeeLabel_name}" for="name" />
                    <h:inputText id="name" value="#{employeeController.selected.name}" title="#{bundle.CreateEmployeeTitle_name}" required="true" requiredMessage="#{bundle.CreateEmployeeRequiredMessage_name}"/>
                    <h:outputLabel value="#{bundle.CreateEmployeeLabel_userName}" for="userName" />
                    <h:inputText id="userName" value="#{employeeController.selected.userName}" title="#{bundle.CreateEmployeeTitle_userName}" required="true" requiredMessage="#{bundle.CreateEmployeeRequiredMessage_userName}"/>
                    <h:outputLabel value="#{bundle.CreateEmployeeLabel_pass}" for="pass" />
                    <h:inputText id="pass" value="#{employeeController.selected.pass}" title="#{bundle.CreateEmployeeTitle_pass}" required="true" requiredMessage="#{bundle.CreateEmployeeRequiredMessage_pass}"/>
                    <h:outputLabel value="#{bundle.CreateEmployeeLabel_phone}" for="phone" />
                    <h:inputText id="phone" value="#{employeeController.selected.phone}" title="#{bundle.CreateEmployeeTitle_phone}" />
                    <h:outputLabel value="#{bundle.CreateEmployeeLabel_other}" for="other" />
                    <h:inputText id="other" value="#{employeeController.selected.other}" title="#{bundle.CreateEmployeeTitle_other}" />
                    <h:outputLabel value="#{bundle.CreateEmployeeLabel_limits}" for="limits" />
                    <h:inputText id="limits" value="#{employeeController.selected.limits}" title="#{bundle.CreateEmployeeTitle_limits}" required="true" requiredMessage="#{bundle.CreateEmployeeRequiredMessage_limits}"/>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{employeeController.create}" value="#{bundle.CreateEmployeeSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{employeeController.prepareList}" value="#{bundle.CreateEmployeeShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateEmployeeIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>
</html>
